/*
    Kelompok    2
    Kelas       2
    Anggota :
    1. Yudha Wastu Prawira      / 13509002
    2. Robertus Theodore        / 13509008
    3. Rendy Bambang Junior     / 13509036
    4. Hartono Sulaiman Wijaya  / 13509046
    5. Daniel Prihartoni        / 13509088
    6. Raydhitya Yosep          / 13509092

*/

#ifndef PARSER_H_INCLUDED
#define PARSER_H_INCLUDED

#include "Constant.h"
#include "Resource.h"
#include <map>
#include <vector>
#include <string>

//==================================================
//Input
//--------------------------------------------------
//command type
typedef map<string,int> CommandDictionary;
typedef pair<string,int> DictionaryElem;
typedef int CommandCode;
typedef struct{
	CommandCode command;
	vector<string> stringParam;
} CommandToken;

//State choose class declaration
class Parser {
//Private class members
private:
	//Variables
	CommandDictionary dictionary;

	//String modifier
	string	toString(string token);
	string	toLowerCase(string token);
    CommandToken command;
	//Procedures
	CommandToken createCommandToken (vector< string >);
//    void processCommand(CommandToken );
//Public class members
public:
	//Constructor & destructor
	Parser();
	~Parser();
    int mode;
    CommandToken getCommand();

	//Template procedure
	void initialize();
	CommandToken update();
	void update(int);
};

#endif
